﻿using System;

namespace maranov.SymlinkManager.FilesystemLinks
{
    /// <summary>
    /// Link's and target's state in the filesystem.
    /// </summary>
    [Flags]
    public enum LinkState
    {
        /// <summary>
        /// No state/no objects exist.
        /// </summary>
        None = 0,

        /// <summary>
        /// Link exists in its location.
        /// </summary>
        LinkExists = 1,

        /// <summary>
        /// Target exists in its location.
        /// </summary>
        TargetExists = 2,

        /// <summary>
        /// Link is connected to the target.
        /// </summary>
        ConnectionExists = 4,

        /// <summary>
        /// Link and target exist in their locations.
        /// </summary>
        LinkAndTargetExists = LinkExists | TargetExists,
        
        /// <summary>
        /// Link exists in its location and is connected to the target.
        /// </summary>
        ConnectedLink,

        /// <summary>
        /// Link and target exist in their locations and link is connected to the target.
        /// </summary>
        FullLink = LinkExists | TargetExists | LinkExists,
    }
}
